/*
 * ODO: Real-Time In-Memory ORM/DBMS Grid software
 * Copyright (c) 2008, Michael Oksenenko
 * All rights reserved.
 */
#ifndef SYSLOG_VISTA_HPP
#define SYSLOG_VISTA_HPP
//----------------------------------------------------------------------------
#include "OsConfig.hpp"
#if ODO_OS_VISTA == ODO_CHOSEN_OS
//----------------------------------------------------------------------------
#include "SyslogIF.hpp"

#include "windows.h"
#include <iostream>

namespace odo {

class SyslogVista : public SyslogIF {

private: // fields

	HANDLE mEventSource;

private: // aux iface
	
	void log(const wchar_t* aMessage, WORD aMesageType);

public: // iface

	void open(const wchar_t* aSyslogName);
	void close();
	
	bool isOpen();
	bool isClosed();

	virtual void logInfo(const wchar_t* aInfo);
	virtual void logWarn(const wchar_t* aWarn);
	virtual void logFail(const wchar_t* aFail);

public: // factory

	virtual ~SyslogVista();
	SyslogVista();

};

}
//----------------------------------------------------------------------------
#endif /* ODO_OS_VISTA */
//----------------------------------------------------------------------------
#endif /* SYSLOG_VISTA_HPP */
